1. Field of the Invention
This invention pertains in general to software downloaded via networks such as the Internet, and in particular to software for executing in a web browser.
2. Description of the Related Art
Gadgets are types of modular applications that can be included in containers. A gadget may provide a real-time weather report or a live news feed, for example. A gadget may allow a user to submit payment information for a product or service. Such a gadget may be used in online payment processing services such as Google Checkout. For example, a user may enter a credit card number and payment amount in input fields within the gadget and press a button within the gadget to submit the information for processing.
Gadgets can be included in various types of containers, such as web pages. A container web page may include a gadget by having a frame that refers to the location, such as a Uniform Resource Locator (URL), of the gadget. When the container web page is displayed to a user through the user's web browser, the contents of the gadget (e.g., code and user interface elements) are retrieved and the gadget is run within the frame on the displayed web page.
Generally, a container web page can include a frame referencing the URL of any publicly available gadget. However, it may be desirable for a gadget's use to be restricted to certain approved containers for various reasons. The individual, organization, or company providing the gadget, referred to here as the “gadget provider,” may want to prevent unknown entities from including the gadget on their web pages. Such unknown entities may place the gadget on web pages containing objectionable content, for example. Also, a web page of an unknown entity may perform malicious actions that compromise the security of the gadget.
Most web browsers prevent a gadget contained in a frame from directly determining the identity of the container web page (e.g., by executing a command requesting this information from the web browser). This is done for various security reasons, such as protecting the privacy of a user viewing the container web page. Therefore, there is a need in the art for a way for a gadget to verify that it is running in an approved or non-malicious container.